<extend name="Layout/ins_page" />
<block name="content">
	{:W('PageHeader/simple',array('name'=>'新建工作日志'))}
	<div class="sub-frame gray">
		<form method='post' id="form_data" name="form_data" enctype="multipart/form-data" >
			<input type="hidden" name="select" id="select" value="">
			<input type="hidden" id="ajax" name="ajax" value="0">
			<input type="hidden" id="opmode" name="opmode" value="add">
			<input type="hidden" id="is_save" name="is_save">
			<input type="hidden" id="type" name="type" value="{$type}">
			<div class="frame">
				<div class="bit-2">
					<div class="layui-form-item">
						<div class="layui-inline">
							<label class="layui-form-label">日期：</label>
							<div class="layui-input-inline" style="width: 100px;">
								<input type="text" class="layui-input input-date" name="start_date" readonly="readonly">
							</div>
						</div>
					</div>
				</div>
				<div class="bit-2">
					<div class="layui-form-item">
						<label class="layui-form-label" for="name">模版：</label>
						<div class="layui-input-block">
							<select class="layui-input">
								<option>模版1</option>
								<option>模版1</option>
								<option>模版1</option>
								<option>模版1</option>
								<option>模版1</option>
							</select>
						</div>
					</div>
				</div>
				<div class="bit-1">
					<div class="layui-form-item">
						<label class="layui-form-label">日报内容：</label>
						<div class="layui-input-block">
							<textarea class="layui-textarea simple" style="height:300px;" id="content" name="content"></textarea>
						</div>
					</div>
				</div>
				<div class="bit-1">
					<div class="layui-form-item">
						<label class="layui-form-label" for="name">附件：</label>
						<div class="layui-input-block">
							{:W('FileUpload/add')}
						</div>
					</div>
				</div>
				<div class="bit-1">
					<div class="layui-form-item">
						<div class="action layui-input-block">
							<a id="btn_save" class="btn">保存</a>
							<a class="btn btn-cancel"  onclick="go_return_url();">取消</a>
						</div>
					</div>
				</div>
			</div>
		</form>
	</div>
</block>

<block name="js">
	<script type="text/javascript">
		layui.use(['global', 'editor'], function() {
			var $ = layui.jquery;
			$('#btn_save').on('click', function() {
				$("#is_save").val(0);
				send_form('form_data', "{:U('save')}", '', function() {
				});
			});
			$('#btn_submit').on('click', function() {
				$("#is_save").val(1);
				send_form('form_data', "{:U('save')}", '', function() {
				});
			});
			$("#btn_add").on('click', function() {
				winopen("{:U('add')}", 560, 470);
			});
			$('#select_actor').on('click', function() {
				winopen("{:U('user_list')}", 560, 470);
			});
			$('.inputbox .address_list a.del').on('click', function() {
				$(this).parent().parent().remove();
			});
		});
	</script>
</block>
